<?php
	$url = $_POST['url'];
	$email = mysql_real_escape_string($_POST['email']);
	$email = strip_tags($email);
	
	$data = mysql_query("select * from dt_newsletter_emails where nl_email = '$email'");
	if(mysql_num_rows($data)<1){
		mysql_query("insert into dt_newsletter_emails (`nl_email`) values ('$email')");
	}

	header("Location: $url");
?>